package com.mes.controller;


import com.mes.entity.Maintain;
import com.mes.service.MaintainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @BelongsPackage: com.mes.controller
 * @Author: 源源瞬转
 * @CreateTime: 2024-09-20  09:57
 * @Description TODO:
 */
@RequestMapping("/MaintainController")
@RestController
public class MaintainController {


    @Autowired
    private MaintainService maintainService;

    @PostMapping("/ListByLike")
    public List<Maintain> ListByLike(@RequestBody Maintain maintain){
        return maintainService.ListByLike(maintain);
    }

    @PostMapping("/insertMaintain")
    public int insertMaintain(@RequestBody Maintain maintain ){
        return maintainService.insertMaintain(maintain);
    }

    @PutMapping("/updateMaintain")
    public int updateMaintain(@RequestBody Maintain maintain ){
        return maintainService.updateMaintain(maintain);
    }
    @DeleteMapping("/removeById")
    public int removeById(String id){
        return maintainService.removeById(id);
    }


}
